package cn.edu.sgu.www.mhxysy.service.chongwu_equipment;

import cn.edu.sgu.www.mhxysy.dto.chongwu_equipment.ChongwuTaozhuangDTO;
import cn.edu.sgu.www.mhxysy.entity.chongwu_equipment.ChongwuTaozhuangCategory;
import cn.edu.sgu.www.mhxysy.pager.chongwu_equipment.ChongwuTaozhuangPager;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
public interface ChongwuTaozhuangCategoryService {

	/**
	 * 上传图片
	 * @param file MultipartFile
	 * @return String
	 * @throws IOException uploadUtils.upload()方法抛出的异常
	 */
	String upload(MultipartFile file) throws IOException;

	/**
	 * 添加宠物套装
	 * @param chongwuTaozhuangDTO 宠物套装信息
	 */
	void insert(ChongwuTaozhuangDTO chongwuTaozhuangDTO);

	/**
	 * 通过ID修改宠物套装
	 * @param chongwuTaozhuangDTO 宠物套装信息
	 */
	void updateById(ChongwuTaozhuangDTO chongwuTaozhuangDTO);

	/**
	 * 通过ID修改宠物套装图片
	 * @param id 宠物套装ID
	 * @param image 图片地址
	 */
	void updateImageById(Integer id, String image);

	/**
	 * 查询全部宠物套装
	 * @return List<ChongwuTaozhuangCategory>
	 */
	List<ChongwuTaozhuangCategory> selectAll();

	/**
	 * 通过ID查询宠物套装
	 * @param id 宠物套装ID
	 * @return ChongwuTaozhuangCategory
	 */
	ChongwuTaozhuangCategory selectById(Integer id);

	/**
	 * 分页查询宠物套装列表
	 * @param pager 分页参数
	 * @return Page<ChongwuTaozhuangCategory>
	 */
	Page<ChongwuTaozhuangCategory> selectByPage(ChongwuTaozhuangPager pager);
}